package com.gykj.tap.service;

import com.serotonin.modbus4j.exception.ErrorResponseException;
import com.serotonin.modbus4j.exception.ModbusInitException;
import com.serotonin.modbus4j.exception.ModbusTransportException;

/**
 * 读取数据
 * 读保持寄存器,[03 Holding Register类型 2x]模拟量数据
 * @author rohto
 *
 */
public interface IReadHodingRegisterService {
	/**
	 * 读取[03 Holding Register类型 2x]模拟量数据
	 * 
	 * @param slaveId slave Id
	 * @param offset 位置
	 * @param dataType 数据类型,来自com.serotonin.modbus4j.code.DataType
	 * @return
	 * @throws ModbusTransportException 异常
	 * @throws ErrorResponseException 异常
	 * @throws ModbusInitException 异常
	 */
	public Number readHoldingRegister(int slaveId, int offset, int dataType) throws ModbusTransportException, ErrorResponseException, ModbusInitException;
}
